package org.example.bighomework.StudentPersonalView;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class StudentPersonalViewController {
    @GetMapping("/StudentPersonalView")
    public  String StudentPersonalView(){
        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        String sno = authentication.getName();
        String url="/SC/query"+sno;
        return "redirect:"+url;
    }
}
